Offline agent using reinforcement learning to speedup trajectory planning for autonomous vehicles

ABSTRACT

In one embodiment, a system generates a plurality of driving scenarios to train a reinforcement learning (RL) agent and replays each of the driving scenarios to train the RL agent by: applying a RL algorithm to an initial state of a driving scenario to determine a number of control actions from a number of discretized control/action options for the ADV to advance to a number of trajectory states which are based on a number of discretized trajectory state options, determining a reward prediction by the RL algorithm for each of the controls/actions, determining a judgment score for the trajectory states, and updating the RL agent based on the judgment score.

TECHNICAL FIELD

Embodiments of the present disclosure relate generally to operatingautonomous vehicles. More particularly, embodiments of the disclosurerelate to an offline agent using reinforcement learning to speed uptrajectory planning for autonomous driving vehicles (ADVs).

BACKGROUND

Vehicles operating in an autonomous mode (e.g., driverless) can relieveoccupants, especially the driver, from some driving-relatedresponsibilities. When operating in an autonomous mode, the vehicle cannavigate to various locations using onboard sensors, allowing thevehicle to travel with minimal human interaction or in some caseswithout any passengers.

Motion planning and control are critical operations in autonomousdriving. However, conventional motion planning operations estimate thedifficulty of completing a given path mainly from its curvature andspeed, without considering the differences in features for differenttypes of vehicles. Same motion planning and control is applied to alltypes of vehicles, which may not be accurate and smooth under somecircumstances.

Trajectories are usually planned based on traffic lanes/reference lineswhich are pre-labeled within a high-definition (HD) map. This processlimits the applicable scenarios for autonomous vehicles with fullautonomous driving, such as, in open space scenarios, where the modelhas to plan trajectories (e.g., parking, U-turn, or three point turns)without a reference lane, and at the same time, to avoid a collision.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the disclosure are illustrated by way of example and notlimitation in the figures of the accompanying drawings in which likereferences indicate similar elements.

FIG. 1 is a block diagram illustrating a networked system according toone embodiment.

FIG. 2 is a block diagram illustrating an example of an autonomousvehicle according to one embodiment.

FIGS. 3A-3B are block diagrams illustrating an example of a perceptionand planning system used with an autonomous vehicle according to oneembodiment.

FIG. 4 is a block diagram illustrating an example of an open spaceplanning module according to one embodiment.

FIG. 5 is a flowchart illustrating an example of a work flow for theopen space planning module according to one embodiment.

FIG. 6 is a flow diagram illustrating an example method according to oneembodiment.

FIG. 7 is a block diagram illustrating an example of an open spaceplanning module according to another embodiment.

FIG. 8 is a block diagram illustrating an example of a system using areinforcement learning agent according to one embodiment.

FIG. 9 is a flow diagram illustrating an example method according to oneembodiment.

FIGS. 10A-10B are block diagrams illustrating examples of a machinelearning engine for reinforcement learning according to one embodiment.

FIG. 11 is a block diagram illustrating an example of an offlinereinforcement learning system according to another embodiment.

FIG. 12 is a block diagram illustrating an example of an actor neuralnetwork according to one embodiment.

FIG. 13 is a block diagram illustrating an example environment modelaccording to one embodiment.

FIG. 14 is a flow diagram illustrating an example method according toone embodiment.

FIG. 15 is a block diagram illustrating a data processing systemaccording to one embodiment.

DETAILED DESCRIPTION

Various embodiments and aspects of the disclosures will be describedwith reference to details discussed below, and the accompanying drawingswill illustrate the various embodiments. The following description anddrawings are illustrative of the disclosure and are not to be construedas limiting the disclosure. Numerous specific details are described toprovide a thorough understanding of various embodiments of the presentdisclosure. However, in certain instances, well-known or conventionaldetails are not described in order to provide a concise discussion ofembodiments of the present disclosures.

Reference in the specification to “one embodiment” or “an embodiment”means that a particular feature, structure, or characteristic describedin conjunction with the embodiment can be included in at least oneembodiment of the disclosure. The appearances of the phrase “in oneembodiment” in various places in the specification do not necessarilyall refer to the same embodiment.

According to a first aspect, an open space model is generated for asystem to plan trajectories for an ADV in an open space. The systemperceives an environment surrounding an ADV including one or moreobstacles. The system determines a target function for the open spacemodel based on constraints for the one or more obstacles and mapinformation. The system iteratively, performs a first quadraticprogramming (QP) optimization on the target function based on a firsttrajectory while fixing a first set of variables, and performs a secondQP optimization on the target function based on a result of the first QPoptimization while fixing a second set of variables. The systemgenerates a second trajectory based on results of the first and thesecond QP optimizations to control the ADV autonomously according to thesecond trajectory.

According to a second aspect, a system uses an actor-criticreinforcement learning (RL) model to generate a trajectory for an ADV inan open space. The system perceives an environment surrounding an ADVincluding one or more obstacles. The system applies a RL algorithm to aninitial state of a planning trajectory based on the perceivedenvironment to determine a number of controls for the ADV to advance toa number of trajectory states based on map and vehicle controlinformation for the ADV. The system determines a reward prediction bythe RL algorithm for each of the controls in view of a targetdestination state. The system generates a first trajectory from thetrajectory states by maximizing the reward predictions to control theADV autonomously according to the first trajectory.

According to a third aspect, a system generates a plurality of drivingscenarios to train a RL agent and replays each of the driving scenariosto train the RL agent by: applying a RL algorithm to an initial state ofa driving scenario to determine a number of control actions from anumber of discretized control/action options for the ADV to advance to anumber of trajectory states which are based on a number of discretizedtrajectory state options, determining a reward prediction by the RLalgorithm for each of the controls/actions, determining a judgment scorefor the trajectory states, and updating the RL agent based on thejudgment score.

FIG. 1 is a block diagram illustrating an autonomous vehicle networkconfiguration according to one embodiment of the disclosure. Referringto FIG. 1, network configuration 100 includes autonomous vehicle 101that may be communicatively coupled to one or more servers 103-104 overa network 102. Although there is one autonomous vehicle shown, multipleautonomous vehicles can be coupled to each other and/or coupled toservers 103-104 over network 102. Network 102 may be any type ofnetworks such as a local area network (LAN), a wide area network (WAN)such as the Internet, a cellular network, a satellite network, or acombination thereof, wired or wireless. Server(s) 103-104 may be anykind of servers or a cluster of servers, such as Web or cloud servers,application servers, backend servers, or a combination thereof. Servers103-104 may be data analytics servers, content servers, trafficinformation servers, map and point of interest (MPOI) servers, orlocation servers, etc.

An autonomous vehicle refers to a vehicle that can be configured to inan autonomous mode in which the vehicle navigates through an environmentwith little or no input from a driver. Such an autonomous vehicle caninclude a sensor system having one or more sensors that are configuredto detect information about the environment in which the vehicleoperates. The vehicle and its associated controller(s) use the detectedinformation to navigate through the environment. Autonomous vehicle 101can operate in a manual mode, a full autonomous mode, or a partialautonomous mode.

In one embodiment, autonomous vehicle 101 includes, but is not limitedto, perception and planning system 110, vehicle control system 111,wireless communication system 112, user interface system 113,infotainment system 114, and sensor system 115. Autonomous vehicle 101may further include certain common components included in ordinaryvehicles, such as, an engine, wheels, steering wheel, transmission,etc., which may be controlled by vehicle control system 111 and/orperception and planning system 110 using a variety of communicationsignals and/or commands, such as, for example, acceleration signals orcommands, deceleration signals or commands, steering signals orcommands, braking signals or commands, etc.

Components 110-115 may be communicatively coupled to each other via aninterconnect, a bus, a network, or a combination thereof. For example,components 110-115 may be communicatively coupled to each other via acontroller area network (CAN) bus. A CAN bus is a vehicle bus standarddesigned to allow microcontrollers and devices to communicate with eachother in applications without a host computer. It is a message-basedprotocol, designed originally for multiplex electrical wiring withinautomobiles, but is also used in many other contexts.

Referring now to FIG. 2, in one embodiment, sensor system 115 includes,but it is not limited to, one or more cameras 211, global positioningsystem (GPS) unit 212, inertial measurement unit (IMU) 213, radar unit214, and a light detection and range (LIDAR) unit 215. GPS system 212may include a transceiver operable to provide information regarding theposition of the autonomous vehicle. IMU unit 213 may sense position andorientation changes of the autonomous vehicle based on inertialacceleration. Radar unit 214 may represent a system that utilizes radiosignals to sense objects within the local environment of the autonomousvehicle. In some embodiments, in addition to sensing objects, radar unit214 may additionally sense the speed and/or heading of the objects.LIDAR unit 215 may sense objects in the environment in which theautonomous vehicle is located using lasers. LIDAR unit 215 could includeone or more laser sources, a laser scanner, and one or more detectors,among other system components. Cameras 211 may include one or moredevices to capture images of the environment surrounding the autonomousvehicle. Cameras 211 may be still cameras and/or video cameras. A cameramay be mechanically movable, for example, by mounting the camera on arotating and/or tilting a platform.

Sensor system 115 may further include other sensors, such as, a sonarsensor, an infrared sensor, a steering sensor, a throttle sensor, abraking sensor, and an audio sensor (e.g., microphone). An audio sensormay be configured to capture sound from the environment surrounding theautonomous vehicle. A steering sensor may be configured to sense thesteering angle of a steering wheel, wheels of the vehicle, or acombination thereof. A throttle sensor and a braking sensor sense thethrottle position and braking position of the vehicle, respectively. Insome situations, a throttle sensor and a braking sensor may beintegrated as an integrated throttle/braking sensor.

In one embodiment, vehicle control system 111 includes, but is notlimited to, steering unit 201, throttle unit 202 (also referred to as anacceleration unit), and braking unit 203. Steering unit 201 is to adjustthe direction or heading of the vehicle. Throttle unit 202 is to controlthe speed of the motor or engine that in turn controls the speed andacceleration of the vehicle. Braking unit 203 is to decelerate thevehicle by providing friction to slow the wheels or tires of thevehicle. Note that the components as shown in FIG. 2 may be implementedin hardware, software, or a combination thereof.

Referring back to FIG. 1, wireless communication system 112 is to allowcommunication between autonomous vehicle 101 and external systems, suchas devices, sensors, other vehicles, etc. For example, wirelesscommunication system 112 can wirelessly communicate with one or moredevices directly or via a communication network, such as servers 103-104over network 102. Wireless communication system 112 can use any cellularcommunication network or a wireless local area network (WLAN), e.g.,using WiFi to communicate with another component or system. Wirelesscommunication system 112 could communicate directly with a device (e.g.,a mobile device of a passenger, a display device, a speaker withinvehicle 101), for example, using an infrared link, Bluetooth, etc. Userinterface system 113 may be part of peripheral devices implementedwithin vehicle 101 including, for example, a keyboard, a touch screendisplay device, a microphone, and a speaker, etc.

Some or all of the functions of autonomous vehicle 101 may be controlledor managed by perception and planning system 110, especially whenoperating in an autonomous driving mode. Perception and planning system110 includes the necessary hardware (e.g., processor(s), memory,storage) and software (e.g., operating system, planning and routingprograms) to receive information from sensor system 115, control system111, wireless communication system 112, and/or user interface system113, process the received information, plan a route or path from astarting point to a destination point, and then drive vehicle 101 basedon the planning and control information. Alternatively, perception andplanning system 110 may be integrated with vehicle control system 111.

For example, a user as a passenger may specify a starting location and adestination of a trip, for example, via a user interface. Perception andplanning system 110 obtains the trip related data. For example,perception and planning system 110 may obtain location and routeinformation from an MPOI server, which may be a part of servers 103-104.The location server provides location services and the MPOI serverprovides map services and the POIs of certain locations. Alternatively,such location and MPOI information may be cached locally in a persistentstorage device of perception and planning system 110.

While autonomous vehicle 101 is moving along the route, perception andplanning system 110 may also obtain real-time traffic information from atraffic information system or server (TIS). Note that servers 103-104may be operated by a third party entity. Alternatively, thefunctionalities of servers 103-104 may be integrated with perception andplanning system 110. Based on the real-time traffic information, MPOIinformation, and location information, as well as real-time localenvironment data detected or sensed by sensor system 115 (e.g.,obstacles, objects, nearby vehicles), perception and planning system 110can plan an optimal route and drive vehicle 101, for example, viacontrol system 111, according to the planned route to reach thespecified destination safely and efficiently.

Server 103 may be a data analytics system to perform data analyticsservices for a variety of clients. In one embodiment, data analyticssystem 103 includes data collector 121 and machine learning engine 122.Data collector 121 collects driving statistics 123 from a variety ofvehicles, either autonomous vehicles or regular vehicles driven by humandrivers. Driving statistics 123 include information indicating thedriving commands (e.g., throttle, brake, steering commands) issued andresponses of the vehicles (e.g., speeds, accelerations, decelerations,directions) captured by sensors of the vehicles at different points intime. Driving statistics 123 may further include information describingthe driving environments at different points in time, such as, forexample, routes (including starting and destination locations), MPOIs,road conditions, weather conditions, etc.

Based on driving statistics 123, machine learning engine 122 generatesor trains a set of rules, algorithms, and/or predictive models 124 for avariety of purposes. In one embodiment, algorithms/models 124 mayinclude a bicycle model to model the vehicle dynamics for the ADV, anopen space optimization model or an RL agent/environment model to plan atrajectory for the ADV in an open space. Algorithms/models 124 can thenbe uploaded on ADVs (e.g., models 313 of FIG. 3A) to be utilized by theADVs in real-time.

FIGS. 3A and 3B are block diagrams illustrating an example of aperception and planning system used with an autonomous vehicle accordingto one embodiment. System 300 may be implemented as a part of autonomousvehicle 101 of FIG. 1 including, but is not limited to, perception andplanning system 110, control system 111, and sensor system 115.Referring to FIGS. 3A-3B, perception and planning system 110 includes,but is not limited to, localization module 301, perception module 302,prediction module 303, decision module 304, planning module 305, controlmodule 306, routing module 307, and open space planning module 308.

Some or all of modules 301-308 may be implemented in software, hardware,or a combination thereof. For example, these modules may be installed inpersistent storage device 352, loaded into memory 351, and executed byone or more processors (not shown). Note that some or all of thesemodules may be communicatively coupled to or integrated with some or allmodules of vehicle control system 111 of FIG. 2. Some of modules 301-308may be integrated together as an integrated module. For example,planning module 305 and open space planning module 308 may be anintegrated module.

Localization module 301 determines a current location of autonomousvehicle 300 (e.g., leveraging GPS unit 212) and manages any data relatedto a trip or route of a user. Localization module 301 (also referred toas a map and route module) manages any data related to a trip or routeof a user. A user may log in and specify a starting location and adestination of a trip, for example, via a user interface. Localizationmodule 301 communicates with other components of autonomous vehicle 300,such as map and route information 311, to obtain the trip related data.For example, localization module 301 may obtain location and routeinformation from a location server and a map and POI (MPOI) server. Alocation server provides location services and an MPOI server providesmap services and the POIs of certain locations, which may be cached aspart of map and route information 311. While autonomous vehicle 300 ismoving along the route, localization module 301 may also obtainreal-time traffic information from a traffic information system orserver.

Based on the sensor data provided by sensor system 115 and localizationinformation obtained by localization module 301, a perception of thesurrounding environment is determined by perception module 302. Theperception information may represent what an ordinary driver wouldperceive surrounding a vehicle in which the driver is driving. Theperception can include the lane configuration, traffic light signals, arelative position of another vehicle, a pedestrian, a building,crosswalk, or other traffic related signs (e.g., stop signs, yieldsigns), etc., for example, in a form of an object. The laneconfiguration includes information describing a lane or lanes, such as,for example, a shape of the lane (e.g., straight or curvature), a widthof the lane, how many lanes in a road, one-way or two-way lane, mergingor splitting lanes, exiting lane, etc.

Perception module 302 may include a computer vision system orfunctionalities of a computer vision system to process and analyzeimages captured by one or more cameras in order to identify objectsand/or features in the environment of autonomous vehicle. The objectscan include traffic signals, road way boundaries, other vehicles,pedestrians, and/or obstacles, etc. The computer vision system may usean object recognition algorithm, video tracking, and other computervision techniques. In some embodiments, the computer vision system canmap an environment, track objects, and estimate the speed of objects,etc. Perception module 302 can also detect objects based on othersensors data provided by other sensors such as a radar and/or LIDAR.

For each of the objects, prediction module 303 predicts what the objectwill behave under the circumstances. The prediction is performed basedon the perception data perceiving the driving environment at the pointin time in view of a set of map/rout information 311 and traffic rules312. For example, if the object is a vehicle at an opposing directionand the current driving environment includes an intersection, predictionmodule 303 will predict whether the vehicle will likely move straightforward or make a turn. If the perception data indicates that theintersection has no traffic light, prediction module 303 may predictthat the vehicle may have to fully stop prior to enter the intersection.If the perception data indicates that the vehicle is currently at aleft-turn only lane or a right-turn only lane, prediction module 303 maypredict that the vehicle will more likely make a left turn or right turnrespectively.

For each of the objects, decision module 304 makes a decision regardinghow to handle the object. For example, for a particular object (e.g.,another vehicle in a crossing route) as well as its metadata describingthe object (e.g., a speed, direction, turning angle), decision module304 decides how to encounter the object (e.g., overtake, yield, stop,pass). Decision module 304 may make such decisions according to a set ofrules such as traffic rules or driving rules 312, which may be stored inpersistent storage device 352.

Routing module 307 is configured to provide one or more routes or pathsfrom a starting point to a destination point. For a given trip from astart location to a destination location, for example, received from auser, routing module 307 obtains route and map information 311 anddetermines all possible routes or paths from the starting location toreach the destination location. Routing module 307 may generate areference line in a form of a topographic map for each of the routes itdetermines from the starting location to reach the destination location.A reference line refers to an ideal route or path without anyinterference from others such as other vehicles, obstacles, or trafficcondition. That is, if there is no other vehicle, pedestrians, orobstacles on the road, an ADV should exactly or closely follows thereference line. The topographic maps are then provided to decisionmodule 304 and/or planning module 305. Decision module 304 and/orplanning module 305 examine all of the possible routes to select andmodify one of the most optimal routes in view of other data provided byother modules such as traffic conditions from localization module 301,driving environment perceived by perception module 302, and trafficcondition predicted by prediction module 303. The actual path or routefor controlling the ADV may be close to or different from the referenceline provided by routing module 307 dependent upon the specific drivingenvironment at the point in time.

Based on a decision for each of the objects perceived, planning module305 plans a path or route for the autonomous vehicle, as well as drivingparameters (e.g., distance, speed, and/or turning angle), using areference line provided by routing module 307 as a basis. That is, for agiven object, decision module 304 decides what to do with the object,while planning module 305 determines how to do it. For example, for agiven object, decision module 304 may decide to pass the object, whileplanning module 305 may determine whether to pass on the left side orright side of the object. Planning and control data is generated byplanning module 305 including information describing how vehicle 300would move in a next moving cycle (e.g., next route/path segment). Forexample, the planning and control data may instruct vehicle 300 to move10 meters at a speed of 30 mile per hour (mph), then change to a rightlane at the speed of 25 mph.

Based on the planning and control data, control module 306 controls anddrives the autonomous vehicle, by sending proper commands or signals tovehicle control system 111, according to a route or path defined by theplanning and control data. The planning and control data includesufficient information to drive the vehicle from a first point to asecond point of a route or path using appropriate vehicle settings ordriving parameters (e.g., throttle, braking, steering commands) atdifferent points in time along the path or route.

In one embodiment, the planning phase is performed in a number ofplanning cycles, also referred to as driving cycles, such as, forexample, in every time interval of 100 milliseconds (ms). For each ofthe planning cycles or driving cycles, one or more control commands willbe issued based on the planning and control data. That is, for every 100ms, planning module 305 plans a next route segment or path segment, forexample, including a target position and the time required for the ADVto reach the target position. Alternatively, planning module 305 mayfurther specify the specific speed, direction, and/or steering angle,etc. In one embodiment, planning module 305 plans a route segment orpath segment for the next predetermined period of time such as 5seconds. For each planning cycle, planning module 305 plans a targetposition for the current cycle (e.g., next 5 seconds) based on a targetposition planned in a previous cycle. Control module 306 then generatesone or more control commands (e.g., throttle, brake, steering controlcommands) based on the planning and control data of the current cycle.

Note that decision module 304 and planning module 305 may be integratedas an integrated module. Decision module 304/planning module 305 mayinclude a navigation system or functionalities of a navigation system todetermine a driving path for the autonomous vehicle. For example, thenavigation system may determine a series of speeds and directionalheadings to affect movement of the autonomous vehicle along a path thatsubstantially avoids perceived obstacles while generally advancing theautonomous vehicle along a roadway-based path leading to an ultimatedestination. The destination may be set according to user inputs viauser interface system 113. The navigation system may update the drivingpath dynamically while the autonomous vehicle is in operation. Thenavigation system can incorporate data from a GPS system and one or moremaps so as to determine the driving path for the autonomous vehicle.

FIG. 4 is a block diagram illustrating an example of an open spaceplanning module according to one embodiment. Open space planning module308 can generate a trajectory for an ADV in an open space, where thereis no reference lines or traffic lanes to be followed. Examples of anopen space include a parking lot, or a roadway where a vehicle performsa parallel parking, a U-turn, or a three point turn. Referring to FIG.4, in one embodiment, open space planning module 308 includesenvironment perception module 401, target function determiner module403, constraints determiner module 405, dual variable warming up module407, trajectory generator module 409, and hybrid A* search module 411.Environment perception module 401 can perceives an environment of theADV. Target function determiner module 403 can determine a targetfunction for an optimization model (e.g., open space optimization model421 (as part of models 313 of FIG. 3A)) to optimize. Constraintsdeterminer module 405 can determine constraints for the optimizationmodel. Constraints can include inequality, equality, and boundconstraints. Dual variable warming up module 407 can apply a quadraticprogramming solver to a target (objective) function to solve for one ormore variables (such as dual/two variables) subject to some constraints,where the target function is a quadratic function. Trajectory generatormodule 409 can generate a trajectory based on the solved variables.Hybrid A* search module 411 can search for an initial trajectory (zigzag, non-smooth trajectory without consideration for observed obstacles)using a search algorithm, such as an A* search algorithm, or a hybrid A*search algorithm.

FIG. 5 is a flowchart illustrating an example of a work flow for theopen space planning module for an ADV according to one embodiment.Referring FIG. 5, in operation 501, processing logic extractsenvironment constraints from HD map, and moving obstacles constraintsfrom prediction module to generate the open space optimizationalgorithm, and initializes matrices/vectors for the constraints of theoptimization algorithm. In one embodiment, the optimization model can bepreviously generated and uploaded on the ADV (e.g., model 421 of FIG. 4,as part of models 313 of FIG. 3A). Constraints can include distancesfrom the vehicle to the open road boundaries, dimensions of accessibleroadways, road curbs, and one or more obstacles. The obstacles caninclude moving obstacles such as cars and moving pedestrians, andnonmoving obstacles such as buildings, blockades, and fences. The movingobstacles can be processed by a prediction module to determine thepredicted locations for the moving obstacles at some later point intime. These obstacles and constraints can be modeled into matrices andvectors for an optimization algorithm.

An example of an optimization algorithm for a controlled object andobstacles can be given as:

min_(x,u,λ,μ)Σ_(k=0) ^(N) l(x _(k) +u _(k)), such that, ∥A ^((m)) ^(T)λ_(k) ^((m))∥≤1

−g ^(T)μ_(k) ^((m))+(A ^((m)) t(x _(k))−b ^((m)))^(T)λ_(k) ^((m))>0,

G ^(T)μ_(k) ^((m)) +R(x _(k))^(T) A ^((m)) ^(T) λ_(k) ^((m))=0,

h(X _(k) +u _(k))≤0,λ≥0, and μ≥0,

where x_(k) is a trajectory for discretized time step k, x₀=x(0) isinitial point, and x_(N+1)=x_(F) is destination point of the trajectory,and x_(k+1)=f (x_(k)+u_(k)). Here, u_(k) can be vehicle control inputs,such as a heading angle, velocity, and acceleration of the vehicle, andf is a vehicle dynamic model which describes a vehicle dynamic, such asa bicycle model of a vehicle. h(x_(k)+u_(k)) include limitations of thevehicle, such as maximum heading ratio, velocity, and acceleration ofthe vehicle. Matrix A and vector b relates to sizes and locations of oneor more obstacles surrounding the vehicle. Here, the obstacles can bemodeled as polygons. g^(T) and G^(T) relate to a size and location ofthe ADV, respectively. λ and μ describe dual variables representingdistances between obstacles and the vehicle, and R is a rotation matrix,measuring a rotation of the vehicle relative to the obstacles, based ona reference direction of the vehicle. Note, however, some variables maynot be initialized without an initial trajectory, e.g., R is not definedwithout an initial trajectory.

For operation 502, processing logic can apply a hybrid a* searchalgorithm to a simplified vehicle model to search for an initial(coarse) trajectory using the initial and destination states as inputparameters. Here, hybrid A* search can grid the state space (x, y,θ-direction) into one or more branches and perform a tree search withinthe state space grid branches. The tree search can traverse all branchnodes using a simplified vehicle model to generate a coarse trajectoryconnecting an initial state to a destination state. The simplifiedvehicle model can be a simple bicycle model that can travel at variousvelocities within a range of steering which models an ADV, or the coarsetrajectory can simply be a step-wise function that connects two pointswith a shortest distance. However, the generated coarse trajectory maybe zig-zag shaped and may not take into consideration any surroundingobstacles. Based on the coarse trajectory, some variables of theoptimization problem described above can thus be determined. An exampleof such a variable include R, where R is a rotation matrix, measuring arotation of the vehicle relative to obstacles, based on a referencedirection of the vehicle.

For operation 503, in one embodiment, the open space optimizationproblem or the optimization algorithm can be relaxed into an algorithmwith a quadratic target function to be solved. The quadratic targetfunction can be:

min_(x,u,λ,μ)Σ_(k=0) ^(N) ∥A ^((m)) ^(T) λ_(k) ^((m))∥², where

−g ^(T)μ_(k) ^((m))+(A ^((m)) t(x _(k))−b ^((m)))^(T)λ_(k) ^((m))>0,

G ^(T)μ_(k) ^((m)) +R(x _(k))^(T) A ^((m)) ^(T) λ_(k) ^((m))=0,

h(x _(k) +u _(k))≤0,λ≥0, and μ≥0,

The relaxed quadratic function can then be solved by a quadraticprogramming algorithm, which is more computationally efficient than theinterior point convex numerical method, which would be otherwise berequired to solve the non-relaxed open space optimization problem. Inone embodiment, the relaxed quadratic target function is part of models421 of FIG. 4.

For operation 504, process logic fixes the dual variables (e.g., a firstset of vector variables) and solves the relaxed open space optimizationproblem using a QP solver to obtain a planning trajectory and a sequenceof controls. For example, a QP algorithm is applied to solve theequation min_(x,u)∥A^((m)) ^(T) λ_(k) ^((m))∥² where vectors λ,μ are setto some initial constant values.

For operation 505, process logic fixes the controls and trajectoryvalues (e.g., x, u, as a second set of vector variables) and solves therelaxed open space optimization problem with a QP solver to update thedual variables, e.g., min_(x,u)∥A^((m)) ^(T) λ_(k) ^((m))∥² wherevectors x, u are set to the values from the results of operation 504.Next, operation 504 can be repeated with λ, μ set to the results ofoperation 505. Then operations 504 and 505 can be iteratively performeduntil the variables (e.g., x, u, λ, μ) converge. The variable canconverge if the results for subsequent iterations are within apredetermined threshold of the results from the previous iteration. Oncethe output values converge, at operation 506, processing logic generatesan output trajectory x_((k=0 . . . N+1)) basal on the results ofoperations 504-505. Note that x₀ is the initial trajectory state, andx_(N+1)=x_(F) is the final trajectory state.

FIG. 6 is a flow diagram illustrating an example method according to oneembodiment. Process 600 may be performed by processing logic which mayinclude software, hardware, or a combination thereof. For example,process 600 may be performed by open space planning module 308 of FIG.4. Referring to FIG. 6, at block 601, processing logic perceives anenvironment surrounding an ADV including one or more obstacles. At block602, processing logic determines a target function for an open spacemodel based on constraints for the one or more obstacles and mapinformation. At block 603, processing logic, iteratively, performs afirst quadratic programming (QP) optimization on the target functionbased on a first trajectory (e.g., coarse trajectory) while fixing afirst set of variables (e.g., λ,μ). At block 604, processing logicperforms a second QP optimization on the target function based on aresult of the first QP optimization while fixing a second set ofvariables (e.g., x,u). At block 605, processing logic generates a secondtrajectory based on results of the first and the second QP optimizationsto control the ADV autonomously according to the second trajectory.

In one embodiment, processing logic further applies a hybrid A* searchalgorithm to the open space model or an alternate simplified vehiclemodel to generate the first trajectory. In one embodiment, the first setof variables includes dual variables which relates to calculation ofdistance between obstacles and the ADV. In one embodiment, the secondset of variables includes variables for control of the ADV andtrajectory.

In one embodiment, the target function includes a quadratic costfunction for the first and the second QP optimizations. In oneembodiment, the open space model is to generate a trajectory for the ADVwithout following a reference line or traffic lines. In one embodiment,the open space model includes a vehicle dynamic model for the ADV.

FIG. 7 is a block diagram illustrating an example of an open spaceplanning module according to another embodiment. Open space planningmodule 308 can generate a trajectory using a RL agent for an ADV in anopen space, where there is no reference lines or traffic lanes to befollowed. Referring to FIG. 7, in one embodiment, open space planningmodule 308 includes environment perception module 701, RL agent module703, trajectory generator module 705, and criteria determiner module707. Environment perception module 701 can perceives an environment ofthe ADV. The environment perceived includes information for locationsand sizes of perceived obstacles. The environment can further includemap and geographical information, shapes and sizes of parking lot and/orroad for the ADV. The perceived information can further includeinformation about the ADV, such as position, speed and a targetedparking spot for the ADV. RL agent module 703 can apply a RL agent(e.g., RL agent/environment model 721, as part of model 313 of FIG. 3A)to an observed environment of the ADV, e.g., an initial trajectory stateof the ADV. The RL agent 721 can include an actor-critic framework,where the actor includes a policy decision to determine a control oraction for the ADV for a given state, and the critic includes ameasurement scheme to determine a value or reward prediction for theaction based on the given state. The environment model can model aperceived environment of the ADV, vehicle dynamics, vehicle controllimits, and a reward grading or scoring metric, such that theenvironment model can generate an actual reward and a next trajectorystate based on an action and a current trajectory state for the ADV.Thus, the RL agent and the environment model can iteratively generate anumber of next trajectory states (e.g., an output trajectory) and anumber of controls/actions. The scoring metric can include a scoringscheme to evaluate whether the RL agent planned a trajectory with afinal trajectory state at the destination spot, whether the trajectoryis smooth, whether the trajectory avoids all the perceived obstacles.

Referring to the actor-critic framework, in one embodiment, the actorincludes a first neural network, and the critic includes a second neuralnetwork. In another embodiment, critic includes a scoringequation/formula. The first and second neural networks can be deepneural networks. Trajectory generator module 705 can generate atrajectory for the ADV based on a current trajectory state of the ADV tocontrol the ADV to a destination state. Criteria determiner module 707can contain a judgment logic to compare an output trajectory of an RLagent (as part of RL agents 721). The comparison can be based on areference trajectory which can be an output trajectory from anoptimization model (as part of optimization models 421 of FIG. 4). Thejudgment logic can determine if the comparison results in a differencebelow a threshold.

FIG. 8 is a block diagram illustrating an example of a system using areinforcement learning agent according to one embodiment. The system 800can generate a driving trajectory for an ADV in an open spaceenvironment, such as a parking lot, where the open space environment maynot have reference trajectories or traffic markings to guide the ADV.Referring to FIG. 8, in one embodiment, system 800 includes RL agent 803which receives inputs 801. RL agent 803 can interact with environmentmodel 808 to generate discretized trajectory states (e.g., x₀ . . .x_(F)) and controls (e.g., u₀ . . . u_(F)) by applying a reinforcementlearning algorithm to inputs 801. The trajectory and controls outputsare passed through a criteria evaluation 809 (e.g., performed bycriteria determiner module 707). Criteria evaluation 809 can evaluate ifthe trajectory/controls generated by RL agent 803 satisfies a list ofthreshold criteria (or a threshold judgment score), if yes, thetrajectory and controls are output to outputs 811. If the judgment scoreis not satisfactory, criteria determiner 809 can trigger outputs 811 tooutput a second trajectory/second list of controls from open spaceoptimization model 421. In one embodiment, the threshold criteria can bedetermined based on a feedback from open space optimization model 421.For example, the open space optimization model 421 can output atrajectory and controls (as a reference trajectory) to criteriaevaluation 809 for criteria evaluation 809 to compare with the outputsof RL agent 803. Thus, RL agent 803 can learn from its actions andexperiences in comparing to outputs of optimization model 421. Asdescribed above, open space optimization model 421 can include a modelfor vehicle dynamics of the ADV. Note, reinforcement learning (RL)refers to a type of machine learning technique that enables an agent(e.g., RL agent 803) to learn in an interactive environment (e.g.,environment model 808) by trial and error using feedback from itsactions and experiences. Machine learning (ML) relates to algorithms andstatistical models to perform a specific task (here, to generate adriving trajectory) without using explicit instructions, but insteadrelies on patterns and inferences.

In one embodiment, RL agent 803 includes an actor critic framework. Theactor can include a policy function generator to generate a list ofcontrols (or actions) from a current trajectory state and the criticincludes a value function to determine value predictions for thecontrols generated by the actor. In one embodiment, the actor-criticframework includes an actor neural network 805 coupled to a criticneural network 807. In one embodiment, actor neural network 805 and/orcritic neural network 807 are deep neural networks, isolated from eachother. In another embodiment, actor neural network 805 and critic neuralnetwork 807 runs in parallel. Note, a neural network (as part of machinelearning) is a computational approach based on a large collection ofneural units or neurons in a series of hidden layers or inner layers.Each hidden layer is made up of a set of neurons, where each neuron isconnected to one or more neurons in the previous layer, and whereneurons in a single layer can function completely independently and maynot share any connections with other neurons of the layer. A neuralnetwork is self-learning and trained, rather than explicitly programmed.A deep neural network is a neural network with two or more hiddenlayers.

In one embodiment, actor neural network can include a multilayerperceptron (MLP). A MLP is a feedforward neural network which includesat least an input layer, one or more hidden layers with a first set ofweights, and an output layer. The input layer of actor neural network805 can receive inputs 801. Inputs 801 can include information for aperceived environment and vehicle control information for the ADV. Forexample, the environment information can include locations and sizes ofperceived obstacles, and map and geographical information, such asshapes and sizes of parking lot and/or road of the ADV. The vehiclecontrol information can include information about the ADV, such ascurrent position, speed, direction, and a target position, direction,speed for the ADV. In one embodiment, critic neural network can includea MLP. The critic neural network includes one or more hidden layers thatinclude a second set of weights that must be optimized separately fromthe first set of weights of the actor neural network. Note, the hiddenlayers and/or the output layers can have different activation function,such as a linear, sigmoid, tan h, RELU, softmax, etc.

Referring to FIG. 8, at each discretized time step, actor NN 805receives a current trajectory state and generates a control/action. Theenvironment model 808 receives the control action, generates a rewardand a next trajectory state, and passes the reward and next trajectorystate back to RL agent 803. Actor NN 805 of RL agent 803 uses the nexttrajectory state to generate a subsequent control action. Theseoperations can be repeated until the next trajectory state is at adestination trajectory state (e.g., destination location) or theiterations have reached a maximum threshold count. In one embodiment,critic NN 807 performs a reward prediction based on the currenttrajectory state and the control action to evaluate how good is theparticular control action. Critic NN 807 of RL agent 803 can also use anactual reward generated by the environment model 808 to update itsreward predictions.

In one embodiment, for each time step, actor NN 805 may update its firstset of weights based on a result of the critic NN 807, and critic NN 807can update its second set of weights based on a result of actor NN 805,based on time difference (TD) learning. In effect, the RLagent/environment model may be updated online while the vehicle is inoperation. Note, TD learning refers to a process for reinforcementlearning to learn how to predict a value depending on future values of agiven state. The reward/value predictions are adjusted once the actualreward values outcome is known. TD learning adjusts the weights so thata prediction of the next iteration is more accurate.

Based on the states (e.g., a first trajectory) and control actions,criteria module 809 can determine if the outputs of RL agent 803satisfies a predetermined list of criteria. The criteria can include 1)a criteria whether the final state for the trajectory of the ADV is at adestination spot, with a correct vehicle heading, 2) the trajectory issmooth, and 3) the trajectory avoids collision with all obstacles. Ifthe list of criteria is satisfied, criteria module 809 triggers outputs811 to output the first trajectory and/or the controls/actions. If thelist of criteria is not satisfied, criteria module 809 can trigger openspace optimization model 421 to generate a second trajectory and/orcontrol actions and outputs the second trajectory and/or control actionsvia outputs 811.

FIG. 9 is a flow diagram illustrating an example method according to oneembodiment. Process 900 may be performed by processing logic which mayinclude software, hardware, or a combination thereof. For example,process 900 may be performed by open space planning module 308 of FIG.7. Referring to FIG. 9, at block 901, processing logic perceives anenvironment surrounding an ADV including one or more obstacles. At block902, processing logic applies a reinforcement learning (RL) algorithm toan initial state of a planning trajectory based on the perceivedenvironment to determine a list of controls for the ADV to advance to alist of trajectory states (e.g., next states) based on map and vehiclecontrol information for the ADV. At block 903, processing logicdetermines a reward prediction by the RL algorithm for each of thecontrols in view of a target destination state. At block 904, processinglogic generates a first trajectory from the trajectory states bymaximizing the reward predictions to control the ADV autonomouslyaccording to the first trajectory.

In one embodiment, processing logic applies a judgment logic to thefirst trajectory to determine a judgment score for the first trajectory.In another embodiment, the judgment score includes scores for whetherthe first trajectory ends at the destination state, whether the firsttrajectory is smooth, and whether the first trajectory avoids the one ormore obstacles for the perceived environment.

In one embodiment, if the judgment score is below a predeterminedthreshold, processing logic further generates a second trajectory basedon an open space optimization model to control the ADV autonomouslyaccording to the second trajectory. In another embodiment, the openspace optimization model is to generate a trajectory for the ADV withoutfollowing a reference line or traffic lines.

In another embodiment, the open space optimization model includes avehicle dynamic model for the ADV. In another embodiment, the RLalgorithm is performed by an actor neural network and a critic neuralnetwork, and wherein the actor neural network and critic neural networkare deep neural networks.

FIGS. 10A-10B are block diagrams illustrating examples of a machinelearning engine for reinforcement learning according to one embodiment.Machine learning engine 122 of server 103 of FIG. 1 may be used to speedup the training of a RL agent offline. Referring to FIG. 10A, in oneembodiment, machine learning engine 122 includes modules such asscenario generation module 1001, scenario replay module 1003, and RLtraining module 1005. The machine learning engine 122. Scenariogeneration module 1001 can generate a training scenario for RL training.An scenario is a sequence of states/actions which ends with a terminalstate. When an scenario ends, the actor returns to an initial state. Forexample, an scenario for RL training may be a sequence of states togenerate a driving trajectory from an initial state to the final state(e.g., destination spot), or a state within a region of interest of ahigh definition (HD) map that is deemed final. An scenario is differentthan a driving scenario as a driving scenario describes a particulardriving event. A driving scenario may include one or more scenarios.Scenario replay module 1003 can replay an scenario. RL training module1005 can train a RL agent using a replay of an scenario.

FIG. 10B illustrates an example block diagram to train a RL agent.Referring to FIG. 10B, in one embodiment, at block 1011, machinelearning engine 122 generates one or more driving scenarios. An examplescenario can be a confined to a trajectory generation (with an initialand a final trajectory states) for a U-turn on a roadway, or aself-parking maneuver within a parking lot. The generated scenario caninclude an initial position (e.g., initial state), a specified finaldestination (e.g., final state), and a two-dimensional (2D) top-downview image with an ADV at the initial position for the scenario. Machinelearning engine 122 then is to train a RL agent to maneuver an ADV fromthe initial position to the specified final destination for thescenario. At block 1013, machine learning engine 122 can replay thescenarios to train an RL agent. The scenario replay allows the RL agentto interact with an environment model and learn by trial and error. Thetraining (e.g., blocks 1011 and 1013) can repeat until the RL agent hasachieved an optimal reward (e.g., convergence) or until the training hasreached a maximum training iteration count. At block 1015, the trainedRL agent is saved to algorithms/models 124, which can be later deployedonto the ADVs.

FIG. 11 is a block diagram illustrating an example of an offlinereinforcement learning system according to another embodiment. System1100 can be performed by machine learning engine 122 for server 103 ofFIG. 1. Referring to FIG. 11, in one embodiment, system 1100 includes RLagent 803 to be trained, which includes actor neural network 805 andcritic neural network 807 (e.g., an actor-critic framework). Actor NN805 can generate a control action based on a current trajectory state.Critic NN 807 can generate a reward prediction (predict how good is thecontrol action in view of a final trajectory state) based on the controlaction and the current trajectory state. Based on the reward prediction,actor NN 805 can be trained or updated to improve its control actionoutputs. RL agent 803 is coupled to environment model (state) 1109.Environment model (state) 1109 can generate a next trajectory statebased on a control action. As such, RL agent 803 can interact withenvironment model (state) 1109 to iteratively output a number oftrajectory states (e.g., x₀ . . . x_(F), a trajectory) and a number ofcontrol actions (e.g., e.g., u₀ . . . u_(F), controls and/or actions)for the RL agent to maneuver an ADV from an initial trajectory state(e.g., x₀) to a final trajectory state (e.g., x_(F)). RL agent 803 canbe coupled to environment model (reward) 1111, which can generate anactual reward for the output trajectory and provide a feedback to RLagent 803. The reward can be fed back to RL agent 803 to further updatecritic neural network 807. The reward can a score to objectivelyevaluate the trajectory in view of a model-based trajectory output(e.g., such as an output from an optimization model, such asoptimization model 421 of FIG. 4) based on a number of criteria, such aswhether the first trajectory ends at the specified destination state,whether the first trajectory is smooth, and whether the first trajectoryavoids a collision with the one or more obstacles for the scenario. Notethat environment model (state) 1109 and environment model (reward) 1111may be different instances of environment model 721 of FIG. 10A.

FIG. 12 is a block diagram illustrating an example of an actor neuralnetwork (NN) according to one embodiment. Actor NN 1200 can representactor NN 805 of FIG. 11. Referring to FIG. 12, actor NN 1200 includes NN1207 and CNN 1205. For each time step, NN 1207 can receive one or morefeatures from convolution NN (CNN) 1205, and a current trajectory state1201 from an environment model (not shown) to generate a discretizedcontrol action 1209. The CNN 1205 can extract the one or more featuresfrom a region of interest (ROI) of a driving scenario (e.g., 2D top-downimage) with final trajectory state (or final location) 1203. Note,features refer to the inputs to a CNN and represent attributes of theinput data.

Note that, in machine learning, a convolutional neural network (CNN)usually consists of an input and an output layer, as well as multiplehidden layers. The hidden layers of a CNN typically consist ofconvolutional layers, RELU layer i.e. activation function, poolinglayers, fully connected layers and normalization layers, that is, eachneuron in one layer is connected to all neurons in the next layer. CNNis a class of NN that is usually applied to visual images. Note thatdiscretized control action 1209 refers to a single vehicle control oraction (from a number of possible control and/or action options) for aparticular time step. The ROI includes information about obstacles,other vehicles, accessible roadways, curbs, etc. about the scenario forthe region of interest. An example of a control output may be to steerright by 10 degrees in heading direction, and apply a throttle toaccelerator (e.g., heading direction, velocity, acceleration).

FIG. 13 is a block diagram illustrating an example environment modelaccording to one embodiment. Environment model 1300 can representenvironment model (state) 1109 or environment model (reward) 1111 ofFIG. 11. Environment model 1300 can model a simulated environment of anADV (e.g., environment model (state) 1109 or environment model (reward)1111 of FIG. 11) to interact with an RL agent to speed up reinforcementlearning. Environment model 1300 can represent environment model 721 ofFIG. 10A. Referring to FIG. 13, environment model 1300 can includevehicle dynamic model 1301 for an ADV. Vehicle dynamic model 1301 canmodel a vehicle dynamics system. Model 1301 can include a bicyclevehicle model. Model 1301 can further model a slip of the tires to modelthe ADV. Based on model 1301, environment model 1300 can derive a numberof discretized vehicle control options (e.g., steer, throttle, or brake)for discretized vehicle actions (e.g., u₀ . . . u_(F)) 1303. Based onthe allowed control/action options 1303, environment model 1300 canderive final location 1305 that is within a limit of the vehicledynamics model. Environment model 1300 may also derive a reward strategyto score different trajectories. The reward strategy can score atrajectory for whether the trajectory reached a final location (e.g.,x_(F), final trajectory state) 1305, whether the acceleration for thetrajectory is smooth and the trajectory does not zig-zag, and whetherthe trajectory avoids all the obstacles. The planned final location 1305is incorporated into driving scenario/scenario regions of interest (ROI)in 2D top-down views (e.g., images with a ROI mapping) 1307. Environmentmodel 1300 can then discretize the ROI to generate a number oftrajectory state options 1309. ROIs refer to regions of attention in animage for a neural network to process and analyze the image. Here, eachdriving scenario can include one or more ROIs.

FIG. 14 is a block diagram illustrating an example method according toone embodiment. Process 1400 may be performed by processing logic whichmay include software, hardware, or a combination thereof. For example,process 1400 may be performed by machine learning engine 122 of FIG. 1.Referring to FIG. 14, at block 1401, processing logic generates a numberof driving scenarios to train a RL agent. At block 1402, processinglogic replays each of the driving scenarios to train the RL agent by, atblock 1403, applying a reinforcement learning (RL) algorithm to aninitial state of a driving scenario to determine a number of controlactions from a number of discretized control action options, for the ADVto advance to a number of trajectory states from a number of discretizedtrajectory state options, at block 1404, determining a reward predictionby the RL algorithm for each of the control actions, at block 1405,determining a judgment score (e.g., reward) for the trajectory states(e.g., a generated trajectory), and at block 1406, updating the RL agentbased on the judgment score (e.g., reward).

In one embodiment, the discretized control action options are generatedbase on a vehicle dynamic model for the ADV. In one embodiment, thediscretized trajectory state options are generated by discretizing aregion of interest for the each driving scenario in view of a finaldestination trajectory state.

In one embodiment, the judgment score includes scores for whether thefirst trajectory ends at the planned destination state, the firsttrajectory is smooth, and the first trajectory avoids the one or moreobstacles of an environment model. In one embodiment, each drivingscenario includes one or more regions of interest.

In one embodiment, the RL agent includes an actor neural network and acritic neural network, and wherein the actor and critic neural networksare deep neural networks. In another embodiment, the actor neuralnetwork includes a convolutional neural network.

Note that some or all of the components as shown and described above maybe implemented in software, hardware, or a combination thereof. Forexample, such components can be implemented as software installed andstored in a persistent storage device, which can be loaded and executedin a memory by a processor (not shown) to carry out the processes oroperations described throughout this application. Alternatively, suchcomponents can be implemented as executable code programmed or embeddedinto dedicated hardware such as an integrated circuit (e.g., anapplication specific IC or ASIC), a digital signal processor (DSP), or afield programmable gate array (FPGA), which can be accessed via acorresponding driver and/or operating system from an application.Furthermore, such components can be implemented as specific hardwarelogic in a processor or processor core as part of an instruction setaccessible by a software component via one or more specificinstructions.

FIG. 15 is a block diagram illustrating an example of a data processingsystem which may be used with one embodiment of the disclosure. Forexample, system 1500 may represent any of data processing systemsdescribed above performing any of the processes or methods describedabove, such as, for example, perception and planning system 110 or anyof servers 103-104 of FIG. 1. System 1500 can include many differentcomponents. These components can be implemented as integrated circuits(ICs), portions thereof, discrete electronic devices, or other modulesadapted to a circuit board such as a motherboard or add-in card of thecomputer system, or as components otherwise incorporated within achassis of the computer system.

Note also that system 1500 is intended to show a high level view of manycomponents of the computer system. However, it is to be understood thatadditional components may be present in certain implementations andfurthermore, different arrangement of the components shown may occur inother implementations. System 1500 may represent a desktop, a laptop, atablet, a server, a mobile phone, a media player, a personal digitalassistant (PDA), a Smartwatch, a personal communicator, a gaming device,a network router or hub, a wireless access point (AP) or repeater, aset-top box, or a combination thereof. Further, while only a singlemachine or system is illustrated, the term “machine” or “system” shallalso be taken to include any collection of machines or systems thatindividually or jointly execute a set (or multiple sets) of instructionsto perform any one or more of the methodologies discussed herein.

In one embodiment, system 1500 includes processor 1501, memory 1503, anddevices 1505-1508 connected via a bus or an interconnect 1510. Processor1501 may represent a single processor or multiple processors with asingle processor core or multiple processor cores included therein.Processor 1501 may represent one or more general-purpose processors suchas a microprocessor, a central processing unit (CPU), or the like. Moreparticularly, processor 1501 may be a complex instruction set computing(CISC) microprocessor, reduced instruction set computing (RISC)microprocessor, very long instruction word (VLIW) microprocessor, orprocessor implementing other instruction sets, or processorsimplementing a combination of instruction sets. Processor 1501 may alsobe one or more special-purpose processors such as an applicationspecific integrated circuit (ASIC), a cellular or baseband processor, afield programmable gate array (FPGA), a digital signal processor (DSP),a network processor, a graphics processor, a communications processor, acryptographic processor, a co-processor, an embedded processor, or anyother type of logic capable of processing instructions.

Processor 1501, which may be a low power multi-core processor socketsuch as an ultra-low voltage processor, may act as a main processingunit and central hub for communication with the various components ofthe system. Such processor can be implemented as a system on chip (SoC).Processor 1501 is configured to execute instructions for performing theoperations and steps discussed herein. System 1500 may further include agraphics interface that communicates with optional graphics subsystem1504, which may include a display controller, a graphics processor,and/or a display device.

Processor 1501 may communicate with memory 1503, which in one embodimentcan be implemented via multiple memory devices to provide for a givenamount of system memory. Memory 1503 may include one or more volatilestorage (or memory) devices such as random access memory (RAM), dynamicRAM (DRAM), synchronous DRAM (SDRAM), static RAM (SRAM), or other typesof storage devices. Memory 1503 may store information includingsequences of instructions that are executed by processor 1501, or anyother device. For example, executable code and/or data of a variety ofoperating systems, device drivers, firmware (e.g., input output basicsystem or BIOS), and/or applications can be loaded in memory 1503 andexecuted by processor 1501. An operating system can be any kind ofoperating systems, such as, for example, Robot Operating System (ROS),Windows operating system from Microsoft®, Mac OS®/iOS® from Apple,Android® from Google®, LINUX, UNIX, or other real-time or embeddedoperating systems.

System 1500 may further include IO devices such as devices 1505-1508,including network interface device(s) 1505, optional input device(s)1506, and other optional IO device(s) 1507. Network interface device1505 may include a wireless transceiver and/or a network interface card(NIC). The wireless transceiver may be a WiFi transceiver, an infraredtransceiver, a Bluetooth transceiver, a WiMax transceiver, a wirelesscellular telephony transceiver, a satellite transceiver (e.g., a globalpositioning system (GPS) transceiver), or other radio frequency (RF)transceivers, or a combination thereof. The NIC may be an Ethernet card.

Input device(s) 1506 may include a mouse, a touch pad, a touch sensitivescreen (which may be integrated with display device 1504), a pointerdevice such as a stylus, and/or a keyboard (e.g., physical keyboard or avirtual keyboard displayed as part of a touch sensitive screen). Forexample, input device 1506 may include a touch screen controller coupledto a touch screen. The touch screen and touch screen controller can, forexample, detect contact and movement or break thereof using any of aplurality of touch sensitivity technologies, including but not limitedto capacitive, resistive, infrared, and surface acoustic wavetechnologies, as well as other proximity sensor arrays or other elementsfor determining one or more points of contact with the touch screen.

IO devices 1507 may include an audio device. An audio device may includea speaker and/or a microphone to facilitate voice-enabled functions,such as voice recognition, voice replication, digital recording, and/ortelephony functions. Other IO devices 1507 may further include universalserial bus (USB) port(s), parallel port(s), serial port(s), a printer, anetwork interface, a bus bridge (e.g., a PCI-PCI bridge), sensor(s)(e.g., a motion sensor such as an accelerometer, gyroscope, amagnetometer, a light sensor, compass, a proximity sensor, etc.), or acombination thereof. Devices 1507 may further include an imagingprocessing subsystem (e.g., a camera), which may include an opticalsensor, such as a charged coupled device (CCD) or a complementarymetal-oxide semiconductor (CMOS) optical sensor, utilized to facilitatecamera functions, such as recording photographs and video clips. Certainsensors may be coupled to interconnect 1510 via a sensor hub (notshown), while other devices such as a keyboard or thermal sensor may becontrolled by an embedded controller (not shown), dependent upon thespecific configuration or design of system 1500.

To provide for persistent storage of information such as data,applications, one or more operating systems and so forth, a mass storage(not shown) may also couple to processor 1501. In various embodiments,to enable a thinner and lighter system design as well as to improvesystem responsiveness, this mass storage may be implemented via a solidstate device (SSD). However in other embodiments, the mass storage mayprimarily be implemented using a hard disk drive (HDD) with a smalleramount of SSD storage to act as a SSD cache to enable non-volatilestorage of context state and other such information during power downevents so that a fast power up can occur on re-initiation of systemactivities. Also a flash device may be coupled to processor 1501, e.g.,via a serial peripheral interface (SPI). This flash device may providefor non-volatile storage of system software, including BIOS as well asother firmware of the system.

Storage device 1508 may include computer-accessible storage medium 1509(also known as a machine-readable storage medium or a computer-readablemedium) on which is stored one or more sets of instructions or software(e.g., module, unit, and/or logic 1528) embodying any one or more of themethodologies or functions described herein. Processingmodule/unit/logic 1528 may represent any of the components describedabove, such as, for example, machine learning engine 122 of FIG. 1,planning module 305, control module 306, and open space planning module308 of FIG. 3A. Processing module/unit/logic 1528 may also reside,completely or at least partially, within memory 1503 and/or withinprocessor 1501 during execution thereof by data processing system 1500,memory 1503 and processor 1501 also constituting machine-accessiblestorage media. Processing module/unit/logic 1528 may further betransmitted or received over a network via network interface device1505.

Computer-readable storage medium 1509 may also be used to store the somesoftware functionalities described above persistently. Whilecomputer-readable storage medium 1509 is shown in an exemplaryembodiment to be a single medium, the term “computer-readable storagemedium” should be taken to include a single medium or multiple media(e.g., a centralized or distributed database, and/or associated cachesand servers) that store the one or more sets of instructions. The terms“computer-readable storage medium” shall also be taken to include anymedium that is capable of storing or encoding a set of instructions forexecution by the machine and that cause the machine to perform any oneor more of the methodologies of the present disclosure. The term“computer-readable storage medium” shall accordingly be taken toinclude, but not be limited to, solid-state memories, and optical andmagnetic media, or any other non-transitory machine-readable medium.

Processing module/unit/logic 1528, components and other featuresdescribed herein can be implemented as discrete hardware components orintegrated in the functionality of hardware components such as ASICS,FPGAs, DSPs or similar devices. In addition, processingmodule/unit/logic 1528 can be implemented as firmware or functionalcircuitry within hardware devices. Further, processing module/unit/logic1528 can be implemented in any combination hardware devices and softwarecomponents.

Note that while system 1500 is illustrated with various components of adata processing system, it is not intended to represent any particulararchitecture or manner of interconnecting the components; as suchdetails are not germane to embodiments of the present disclosure. Itwill also be appreciated that network computers, handheld computers,mobile phones, servers, and/or other data processing systems which havefewer components or perhaps more components may also be used withembodiments of the disclosure.

Some portions of the preceding detailed descriptions have been presentedin terms of algorithms and symbolic representations of operations ondata bits within a computer memory. These algorithmic descriptions andrepresentations are the ways used by those skilled in the dataprocessing arts to most effectively convey the substance of their workto others skilled in the art. An algorithm is here, and generally,conceived to be a self-consistent sequence of operations leading to adesired result. The operations are those requiring physicalmanipulations of physical quantities.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the above discussion, itis appreciated that throughout the description, discussions utilizingterms such as those set forth in the claims below, refer to the actionand processes of a computer system, or similar electronic computingdevice, that manipulates and transforms data represented as physical(electronic) quantities within the computer system's registers andmemories into other data similarly represented as physical quantitieswithin the computer system memories or registers or other suchinformation storage, transmission or display devices.

Embodiments of the disclosure also relate to an apparatus for performingthe operations herein. Such a computer program is stored in anon-transitory computer readable medium. A machine-readable mediumincludes any mechanism for storing information in a form readable by amachine (e.g., a computer). For example, a machine-readable (e.g.,computer-readable) medium includes a machine (e.g., a computer) readablestorage medium (e.g., read only memory (“ROM”), random access memory(“RAM”), magnetic disk storage media, optical storage media, flashmemory devices).

The processes or methods depicted in the preceding figures may beperformed by processing logic that comprises hardware (e.g. circuitry,dedicated logic, etc.), software (e.g., embodied on a non-transitorycomputer readable medium), or a combination of both. Although theprocesses or methods are described above in terms of some sequentialoperations, it should be appreciated that some of the operationsdescribed may be performed in a different order. Moreover, someoperations may be performed in parallel rather than sequentially.

Embodiments of the present disclosure are not described with referenceto any particular programming language. It will be appreciated that avariety of programming languages may be used to implement the teachingsof embodiments of the disclosure as described herein.

In the foregoing specification, embodiments of the disclosure have beendescribed with reference to specific exemplary embodiments thereof. Itwill be evident that various modifications may be made thereto withoutdeparting from the broader spirit and scope of the disclosure as setforth in the following claims. The specification and drawings are,accordingly, to be regarded in an illustrative sense rather than arestrictive sense.

What is claimed is:
 1. A computer-implemented method for training areinforcement learning agent for autonomous driving, the methodcomprising: generating a plurality of driving scenarios to train areinforcement learning (RL) agent for autonomous driving; and replayingeach of the driving scenarios to train the RL agent by, applying an RLalgorithm to an initial state of the driving scenario to determine aplurality of control actions from a plurality of discretized controlaction options to advance to a plurality of trajectory states from aplurality of discretized trajectory state options; determining a rewardprediction using the RL algorithm for each of the plurality of controlactions; determining a judgment score for the plurality of trajectorystates; and updating the RL agent based on the judgment score, whereinthe RL agent is utilized to generate a trajectory to autonomously drivean autonomous driving vehicle (ADV) subsequently.
 2. The method of claim1, wherein the plurality of discretized control action options aregenerated based on a vehicle dynamic model for autonomous driving. 3.The method of claim 1, wherein the plurality of discretized trajectorystate options are generated by discretizing a region of interest for theeach driving scenario in view of a final destination trajectory state.4. The method of claim 1, wherein the judgment score includes scoresrepresenting whether the first trajectory ends at the planneddestination state, the first trajectory is smooth, and the firsttrajectory avoids the one or more obstacles of an environment model. 5.The method of claim 1, wherein each driving scenario includes one ormore regions of interest (ROIs).
 6. The method of claim 1, wherein theRL agent includes an actor neural network and a critic neural network,and wherein the actor and critic neural networks are deep neuralnetworks.
 7. The method of claim 6, wherein the actor neural networkincludes a convolutional neural network.
 8. A non-transitorymachine-readable medium having instructions stored therein, which whenexecuted by a processor, cause the processor to perform operations, theoperations comprising: generating a plurality of driving scenarios totrain a reinforcement learning (RL) agent for autonomous driving; andreplaying each of the driving scenarios to train the RL agent by,applying an RL algorithm to an initial state of the driving scenario todetermine a plurality of control actions from a plurality of discretizedcontrol action options to advance to a plurality of trajectory statesfrom a plurality of discretized trajectory state options; determining areward prediction using the RL algorithm for each of the plurality ofcontrol actions; determining a judgment score for the plurality oftrajectory states; and updating the RL agent based on the judgmentscore, wherein the RL agent is utilized to generate a trajectory toautonomously drive an autonomous driving vehicle (ADV) subsequently. 9.The machine-readable medium of claim 8, wherein the plurality ofdiscretized control action options are generated based on a vehicledynamic model for autonomous driving.
 10. The machine-readable medium ofclaim 8, wherein the plurality of discretized trajectory state optionsare generated by discretizing a region of interest for the each drivingscenario in view of a final destination trajectory state.
 11. Themachine-readable medium of claim 8, wherein the judgment score includesscores representing whether the first trajectory ends at the planneddestination state, the first trajectory is smooth, and the firsttrajectory avoids the one or more obstacles of an environment model. 12.The machine-readable medium of claim 8, wherein each driving scenarioincludes one or more regions of interest (ROIs).
 13. Themachine-readable medium of claim 8, wherein the RL agent includes anactor neural network and a critic neural network, and wherein the actorand critic neural networks are deep neural networks.
 14. Themachine-readable medium of claim 13, wherein the actor neural networkincludes a convolutional neural network.
 15. A data processing system,comprising: a processor; and a memory coupled to the processor to storeinstructions, which when executed by the processor, cause the processorto perform operations, the operations including generating a pluralityof driving scenarios to train a reinforcement learning (RL) agent forautonomous driving; and replaying each of the driving scenarios to trainthe RL agent by, applying an RL algorithm to an initial state of thedriving scenario to determine a plurality of control actions from aplurality of discretized control action options to advance to aplurality of trajectory states from a plurality of discretizedtrajectory state options, determining a reward prediction using the RLalgorithm for each of the plurality of control actions, determining ajudgment score for the plurality of trajectory states, and updating theRL agent based on the judgment score, wherein the RL agent is utilizedto generate a trajectory to autonomously drive an autonomous drivingvehicle (ADV) subsequently.
 16. The system of claim 15, wherein theplurality of discretized control action options are generated based on avehicle dynamic model for autonomous driving.
 17. The system of claim15, wherein the plurality of discretized trajectory state options aregenerated by discretizing a region of interest for the each drivingscenario in view of a final destination trajectory state.
 18. The systemof claim 15, wherein the judgment score includes scores representingwhether the first trajectory ends at the planned destination state, thefirst trajectory is smooth, and the first trajectory avoids the one ormore obstacles of an environment model.
 19. The system of claim 15,wherein each driving scenario includes one or more regions of interest(ROIs).
 20. The system of claim 15, wherein the RL agent includes anactor neural network and a critic neural network, and wherein the actorand critic neural networks are deep neural networks.
 21. The system ofclaim 20, wherein the actor neural network includes a convolutionalneural network.